package com.www.applyword.adapter;

import android.content.Context;

import com.classic.adapter.BaseAdapterHelper;
import com.classic.adapter.CommonRecyclerAdapter;
import com.www.applyword.R;

/**
 * author : huang
 * date   : 2019/10/21 0021 15:06
 * version: 1.0
 * @author Administrator
 */
public class JobWorkAdapter extends CommonRecyclerAdapter<String> {
    public JobWorkAdapter(Context context) {
        super(context, R.layout.item_job_work);
    }


    @Override
    public void onUpdate(BaseAdapterHelper helper, String item, int position) {
        if (item.equals("包吃")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.eat);
        }else if (item.equals("包住")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.encase);
        }else if (item.equals("带薪年假")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.paid);
        }else if (item.equals("饭补")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.food);
        }else if (item.equals("房补")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.housing);
        }else if (item.equals("话补")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.words_fill);
        }else if (item.equals("加班补助")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.overtime);
        }else if (item.equals("交通补助")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.traffic);
        }else if (item.equals("年底双薪")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.year_end);
        }else if (item.equals("五险一金")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.five);
        }else if (item.equals("有提成")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.commission);
        }else if (item.equals("周末双休")){
            helper.getView(R.id.iv_work).setBackgroundResource(R.mipmap.weekends);
        }
        helper.setText(R.id.tv_job_word,item);
    }
}

